package thread;

public class ThreadDemo11 {

    public static void main(String[] args) {
        Thread t = new Thread(() ->{
            for (int i = 0; i < 1000000; i++) {

            }
        });

        System.out.println("start之前:" + t.getState());
        t.start();
        System.out.println(t.getState());
        System.out.println(t.isAlive());
        try {
            t.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println(t.isAlive());
        System.out.println("start之后:"+t.getState());

    }
}
